<template>
	<div class="thePage">
		<h1>这里是商品列表页</h1>
		<div v-for="i in count" :key="i" @click="onDetail(i)">
			<div class="productItem">商品Id：{{ i }} 的信息列表</div>
		</div>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				count: 10,
			};
		},
		methods: {
			onDetail(i) {
				this.$router.push({
					name: 'productDetail',
					params: { id: i }
				})
			}
		}
	};
</script>

<style scoped>
	.thePage {
		background-color: #f9f9f9;
	}

	.productItem {}
</style>